
 // readdirSync_scandir
function walkFileTree(path, SimpleFileVisitor) {
    var pm=require("path");
    fs=require("fs");
    if(path==NaN)
        return;
	console.log(" will readFileList path:"+path);
    var files = fs.readdirSync(path);
    files.forEach(function (fname, index) {
        if(fname=='yunprint')
           console.log("debg");
        if(fname==NaN)
            return;
        var fullname = path + pm.sep+ fname;
        console.log("-- foreach path or file :"+fullname);
        var stat = fs.statSync(fullname);

        if (stat.isDirectory()) {
            //�ݹ��ȡ�ļ�
            //
            var fullpath2 = path+ pm.sep+   fname;
            console.log("--is dir:"+ fullpath2);

            walkFileTree(fullpath2 , SimpleFileVisitor)
        } else {

            var obj = {};//����һ���������ļ���·��������
            obj.path = path;//·��
            obj.filename = fname//����
            obj.pathfull=path+"//"+fname;
            SimpleFileVisitor (obj);
        }

    })

}


exports.walkFileTree =walkFileTree

 